<template>
  <div>
    <div>restaurant</div>
    <div v-for="item in restaurants" :key="item._id">
      {{ item.name['zh-CN'] }}
    </div>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex';

export default {
  name: 'Restaurant',
  computed: {
    ...mapState({
      restaurants: (state) => state.restaurant.list,
    }),
  },
  created() {
    this.loadRestaurant();
  },
  metnods: {
    ...mapActions(['loadRestaurant']),
  },
};
</script>

<style>
</style>
